/* A: B does not steal, D steals 
 * B: I do not steal, C steals
 * C: A does not steal, B steals
 * D: I do not steal.  
 * all of them is either honest or lying all the time.
 */

#include<stdio.h>

int main(void){
  int i, j, a[4],n;
  for(i=0;i<4;i++)  
    {
    for(j=0;j<4;j++)
      if(j==i) a[j]=1;
      else a[j]=0;        //set ith person as thief, exausation

    if(a[1]+a[3]==1&&a[1]+a[2]==1&&a[0]+a[1]==1&&a[0]+a[1]+a[2]+a[3]==1)
      {
        printf("The thief is");
        for(j=0;j<=3;j++)
	  if(a[j]) printf(" %c.", j+'A');
        printf("\n");
      }
    }

  return 0;
}
